//
//  SQHitTableViewCell.m
//  pai
//
//  Created by pro on 14-12-10.
//  Copyright (c) 2014年 linjunjing. All rights reserved.
//

#import "SQHitTableViewCell.h"

@implementation SQHitTableViewCell

- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void)setItem:(hit_t)hit
{
    self.nameLabel.text = [ NSString stringWithUTF8String:hit.username];
    
    self.priceLabel.text = [NSString stringWithFormat:@"%ld豆",(long)hit.auctprice];
    
    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
    [dateFormatter setDateFormat:@"MM-dd HH:mm:ss"];
    NSDate* start = [NSDate dateWithTimeIntervalSince1970:hit.aucttime];
    NSString *strDate = [dateFormatter stringFromDate:start];
    self.timeLabel.text = strDate;
}
@end
